Object.defineProperty(exports, "__esModule", {
  value: !0
}), exports.moveToTabPlace = exports.checkScrollTop = void 0;
var e = require("../../../@babel/runtime/helpers/regeneratorRuntime"),
  r = require("../../../@babel/runtime/helpers/asyncToGenerator");
exports.checkScrollTop = function (e, r, o) {
  var t = r || 0;
  Math.floor(e) + 1 >= Math.floor(t) ? o && o(t) : wx.pageScrollTo({
    scrollTop: t + 1,
    duration: e < 200 ? 100 : 0,
    complete: function () {
      o && o(t)
    }
  })
};
var o = function () {
  var o = r(e().mark((function r(o, t) {
    return e().wrap((function (e) {
      for (;;) switch (e.prev = e.next) {
        case 0:
          return e.abrupt("return", new Promise((function (e) {
            o ? wx.pageScrollTo({
              scrollTop: t + 1 || 239,
              duration: 0,
              complete: function () {
                var r = setTimeout((function () {
                  clearTimeout(r), e(!0)
                }), 20)
              }
            }) : e(!0)
          })));
        case 1:
        case "end":
          return e.stop()
      }
    }), r)
  })));
  return function (e, r) {
    return o.apply(this, arguments)
  }
}();
exports.moveToTabPlace = o;